package com.example.chapter03;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

public class ActReceiveActivity extends AppCompatActivity {

    private TextView tv_receive;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_act_receive);
        tv_receive = findViewById(R.id.tv_receive);

        Bundle bundle = getIntent().getExtras();
        String request_time = bundle.getString("request_time");
        String request_text = bundle.getString("request_text");

        String ans = String.format("收到请求消息：\n请求时间：%s\n请求内容：%s", request_time, request_text);
        tv_receive.setText(ans);
    }
}